Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use user from request context #759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

prudloff-insite
Copy link
Contributor

This fixes #758 for us but it might not be the correct solution.

I find it a bit strange that Parser::getUserIdentity() does not check if Parser::getOptions() returns null before trying to use its result. (The documentation of Parser::getOptions() acknowledges that it can return null.)

@JeroenDeDauw
Copy link
Member

I'm not sure either that your change is correct. It seems safer to get the user from the Parser object rather than via a global.

Copy link

@freephile freephile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we check for null ParserOptions like so:

!is_null($this->parser::getOptions()) ?? new ParserOptions($this->parser->getUserIdentity()) : null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maps with polygons break visual editor
3 participants